from peewee import *

db = MySQLDatabase('spider_work',
                   host="101.35.154.29",
                   port=3306,
                   user="zspider",
                   password="fy7777777")


class DataModel(Model):
    class Meta:
        database = db


class JobsInfo(DataModel):  # 招聘岗位
    job_name = CharField(max_length="255", verbose_name="岗位名称")
    job_salary = CharField(max_length="255", verbose_name="薪资范围")
    job_place = CharField(max_length="255", verbose_name="工作地点")
    job_experience = CharField(max_length="255", verbose_name="经验要求")
    job_education = CharField(max_length="255", verbose_name="学历要求")
    job_tag = TextField(default="", verbose_name="岗位标签")
    company_name = CharField(max_length="255", verbose_name="公司名称")
    company_type = CharField(max_length="255", verbose_name="公司类型")
    company_scale = CharField(max_length="255", default="", verbose_name="企业规模")
    link = TextField(default="", verbose_name="岗位链接")


db.create_tables([JobsInfo])
